<?php
/**
 * Copyright 2010 - 2013, Cake Development Corporation (http://cakedc.com)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright Copyright 2010 - 2013, Cake Development Corporation (http://cakedc.com)
 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
 */
$this->Html->addCrumb('Home', '/admin');
$this->Html->addCrumb('Lista Usuários', array('action' => 'index'));
?>

<?php echo $this->Paginator->pagination(); ?>
<table class="table table-condensed table-hover table-bordered">
    <thead>
        <tr>
            <th><?php echo $this->Paginator->sort('username', 'Usuário'); ?></th>
            <th><?php echo $this->Paginator->sort('email', 'E-mail'); ?></th>
            <th><?php echo $this->Paginator->sort('status', 'Situação'); ?></th>
            <th><?php echo $this->Paginator->sort('created', 'Data/Hora criação'); ?></th>
            <th class="actions"><?php echo __d('users', 'Actions'); ?></th>
        </tr>
    </thead>
    <tbody>
        <?php foreach ($users as $user) { ?>
            <tr>
                <td> <?php echo $user['Usuario']['username']; ?> </td>
                <td> <?php echo $user['Usuario']['email']; ?> </td>
                <td> <?php echo $user['Usuario']['status'] == 1 ? __d('users', 'Yes') : __d('users', 'No'); ?> </td>
                <td> <?php echo $user['Usuario']['created']; ?> </td>
                <td class="actions">
                    <?php echo $this->Html->link(__d('users', 'View'), array('action' => 'view', $user['Usuario']['id']), array('class' => 'btn btn-xs btn-info', 'icon' => 'fa fa-search')); ?>
                    <?php echo $this->Html->link(__d('users', 'Edit'), array('action' => 'edit', $user['Usuario']['id']), array('class' => 'btn btn-xs btn-warning', 'icon' => 'fa fa-pencil')); ?>
                    <?php echo $this->Html->link(__d('users', 'Delete'), array('action' => 'delete', $user['Usuario']['id']), array('class' => 'btn btn-xs btn-danger', 'icon' => 'fa fa-trash-o'), sprintf(__d('users', 'Are you sure you want to delete # %s?'), $user['Usuario']['id'])); ?>
                </td>
            </tr>
        <?php } ?>
    </tbody>
</table>
<?php echo $this->Paginator->pagination(); ?>
